﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="_03_layout_ScriptSharp._Default" %>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>Untitled Page</title>
    <style type="text/css">
    body
    {
    	background-color:Black;
    }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
        <scripts>
            <asp:ScriptReference Path="~/aaagctrl.js" />
             <asp:ScriptReference Path="~/SBT.js" />
              <asp:ScriptReference Path="~/Scripts03.js" />
        </scripts>
    </asp:ScriptManager>
    <script type="text/javascript">
    var mgr = null;
        Sys.Application.add_init(function()
        {
            mgr= $create(Scripts03.LayoutMgr, {width:640, height:480,xamlPath:"Layout.xaml"}, null,null,$get("host"));
        });
        function onPanelWidth()
        {
            if(mgr)
                mgr.changeStackPanelSize(parseFloat($get("txtStackWidth").value));
        }
        function onButtonHeight()
        {
            if(mgr)
                mgr.changeCancelBtnSize(parseFloat($get("txtCancelHeight").value));
        }
        function onRandomTags()
        {
            if(mgr)
                mgr.randomTagSizes();
        }
    </script>
    <div id="host">
    
    </div>
    <div id="commands">
        <input type="text" value="220" id="txtStackWidth" /> <input type="button" value="Set stackpanel width" onclick="onPanelWidth()"/> <br />
    <input type="text" value="100" id="txtCancelHeight" /> <input type="button" value="Set Cancel button height" onclick="onButtonHeight()" /><br />
    <input type="button" value="Randomize tags sizes" onclick="onRandomTags()"/>
    </div>
    </form>
</body>
</html>